Programming languages for programmable logic controllers (PLC) can be provided in many different forms. In one case, IEC 1131-3 specifies an international standard for such programmable controller programming languages. As such, it specifies syntax, semantics and display for the following suite of PLC programming languages: Ladder diagram (LD); Sequential Function Charts (SFC); Function Block Diagram (FBD) Structured Text (ST); Instruction List (IL). One of the primary benefits of the 1131 standard is that it enables multiple languages to be used within the same programmable controller. This allows the program developer to select the respective language best suited to the particular task at hand.
From this suite of languages, Sequential Function Chart (SFC) programming offers a graphical method of organizing a program, where the three main components of an SFC are steps, actions and transitions. Steps are considered chunks of logic, i.e., a unit of programming logic that accomplishes a particular control task, and actions are the individual aspects of that task. Transitions are the mechanisms employed to move from one task to another. Generally, control logic for each Step, Action and Transition is programmed in one of the other languages specified by IEC 1131-3 such as Ladder Diagram or Structured Text.
As a graphical language, SFC programming offers several choices for executing a program. In a sequential configuration, the processor simply executes the actions in a step repeatedly, until the transition logic becomes true, where the processor then proceeds to the next step. In a selection branch, only one branch is executed depending on which transition is active. In a simultaneous branch, all branches are executed until the transition becomes active. In addition to various types of branches, the operation of individual actions within a step can be varied with the use of action qualifiers. Action qualifiers determine how the action is scanned and allows actions to be controlled without additional logic. For example, one could use a time-limited qualifier to limit the time that an ingredient valve is opened without writing specific logic to control such actions.
In practice, an active step in the SFC is highlighted to signal to the programmer which part of the program is executing—a useful feature for troubleshooting. This highlighting is an example of the 1131 standard's extensibility—the ability of a vendor to add a feature not specified in the standard. Although highlighting is a useful feature for troubleshooting, current SFC programming techniques provide many challenges. For example, chart structures allow programmers to design various loops that can converge and diverge in many different directions and according to many logical configurations. Such loops could be inadvertently configured as an infinite loop where upon execution of the chart, the infinite loop causes the controller to never reach the end of a program scan. In such cases, a watchdog timeout may occur where the controller would have to be subsequently reset via a power up and down sequence.
As can be appreciated, a plurality of logic errors could be installed by a given programmer during design of the SFC. Currently, existing systems would require live execution in the PLC to determine a given logic or sequence problem. This can take an inordinate amount of time to troubleshoot on the PLC where various steps or transitions may have to be sequentially disabled and re-enabled in order to determine potential programming errors. In many cases, all the components of the system may not be in place to properly execute a given SFC thus causing further debugging difficulties.